import 'package:json_annotation/json_annotation.dart';
part 'User.g.dart';

@JsonSerializable(explicitToJson: true)
class User {
  final bool admin;
  final List<String> chapterTops;
  final List<int> collectIds ;
  final String email ;
  final String icon ;
  final int id ;
  final String nickname ;
  final String password ;
  final String publicName ;
  final String token ;
  final int type ;
  final String username  ;

  User(this.admin, this.chapterTops, this.collectIds, this.email, this.icon, this.id, this.nickname, this.password, this.publicName, this.token, this.type, this.username);

  factory User.fromJson(Map<String, dynamic> json) => _$UserFromJson(json);

  Map<String, dynamic> toJson() => _$UserToJson(this);


}